package com.ant.storage.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author melon
 * @since 2022-03-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Dictionary对象", description="")
public class Dictionary implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelProperty("id")
    @ColumnWidth(10)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ExcelProperty("类型名称")
    @ColumnWidth(20)
    @ApiModelProperty(value = "类型名称")
    @TableField("type_name")
    private String typeName;

    @ExcelProperty("类型key")
    @ColumnWidth(20)
    @ApiModelProperty(value = "类型key")
    @TableField("type_code")
    private String typeCode;

    @ColumnWidth(20)
    @ApiModelProperty(value = "内容")
    @TableField("type_value")
    private String typeValue;


    @ExcelProperty("排序")
    @ColumnWidth(20)
    @ApiModelProperty(value = "排序")
    @TableField("sort_no")
    private Integer sortNo;

    @ExcelProperty("备注")
    @ColumnWidth(20)
    private String remark;


    @ApiModelProperty(value = "是否显示")
    @TableField("is_show")
    private Integer isShow;


    @ApiModelProperty(value = "子级")
    @TableField(exist = false)
    private List<Dictionary> children;


//
//    @ExcelProperty：核心注解，value属性可用来设置表头名称，converter属性可以用来设置类型转换器；
//    @ColumnWidth：用于设置表格列的宽度；
//    @DateTimeFormat：用于设置日期转换格式。
//
}
